Objects with opposing magnetic fields will repel each other. By positioning one below the other, the top object can be made to levitate above the bottom object by this repulsive force.